<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"> 
 
<head> 
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
	<title>湖南省自来水公司营销管理信息系统</title> 
	
	<link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/text.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/form.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/buttons.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/grid.css" type="text/css" media="screen" title="no title" />	
	<link rel="stylesheet" href="../css/layout.css" type="text/css" media="screen" title="no title" />	
	
	<link rel="stylesheet" href="../css/ui-darkness/jquery-ui-1.8.12.custom.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/jquery.visualize.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/facebox.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/uniform.default.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/dataTables.css" type="text/css" media="screen" title="no title" />
	
	<link rel="stylesheet" href="../css/custom.css" type="text/css" media="screen" title="no title">

    <script src="../js/jquery/jquery-3.3.1.js"></script>
    <script src="../js/jquery/jquery-1.5.2.min.js"></script>
    <script src="../js/jquery/jquery-ui-1.8.12.custom.min.js"></script>
    <script src="../js/misc/excanvas.min.js"></script>
    <script src="../js/jquery/facebox.js"></script>
    <script src="../js/jquery/jquery.visualize.js"></script>
    <script src="../js/jquery/jquery.dataTables.min.js"></script>
    <script src="../js/jquery/jquery.tablesorter.min.js"></script>
    <script src="../js/jquery/jquery.uniform.min.js"></script>
    <script src="../js/jquery/jquery.placeholder.min.js"></script>

    <script src="../js/widgets.js"></script>
    <script src="../js/dashboard.js"></script>
    <script src="/webjars/vue/2.5.17/dist/vue.js"></script>

    <script src="../js/layui/layui.js"></script>
    <script src="../js/layui/lay/cmodules/layer.js"></script>
    <link rel="stylesheet" href="../js/layui/css/modules/layer/default/layer.css">

    <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>

    <style type="text/css">
	table.data thead th { vertical-align:middle; text-align:center; }
	</style>

</head>
 
<body> 

    <div id="wrapper">
		<div id="bool">
			<script>window.onload = function () {
				$("#bool").load("../ming.html");
			}</script>
		</div>
	<!--<div id="header">
		
		<div class="content_pad">
			<h1><a href="../workspace.html">湖南省自来水公司营销管理信息系统</a></h1>
			
			<ul id="nav">
				
				<li class="nav_dropdown nav_icon">
					<a href="javascript:;"><span class="ui-icon ui-icon-wrench"></span>业扩工程</a>
					
					<div class="nav_menu">			
						<ul>
							<li><a href="../page/be__request.html">01 用户申请</a></li>
							<li><a href="../page/be__audit.html">02 初步审核</a></li>
							<li><a href="../page/be__pay.html">03 交施工费</a></li>
							<li><a href="../page/be__billclear.html">04 水费清算</a></li>
							<li><a href="../page/be__contract.html">05 供水协议</a></li>
							<li><a href="../page/be__working.html">06 施工竣工</a></li>
							<li><a href="../page/be__open.html">07 通水停水</a></li>
							<li><a href="../page/be__save.html">08 档案存档</a></li>
							<li><a href="../page/be_order.html">工单管理</a></li>
							<li><a href="../page/be_abort.html">终止工单</a></li>
							<li><a href="../page/be_reportProgress.html">业扩工程进度</a></li>
							<li><a href="../page/be_reportMoney.html">业扩收费报表</a></li>
						</ul>
						
					</div>
				</li>

				<li class="nav_dropdown nav_icon">
					<a href="javascript:;"><span class="ui-icon ui-icon-person"></span>用户管理</a>
					
					<div class="nav_menu">			
						<ul>
							<li><a href="../page/user_search.html">用户查询</a></li>	
							<li><a href="../page/user_add.html">快捷新户</a></li>	
							<li><a href="../page/user_changeName.html">快捷过户</a></li>
							<li><a href="../page/user_changeBank.html">快捷代扣</a></li>
							<li><a href="../page/user_changeMeter.html">快捷换表</a></li>
							<li><a href="../page/user_changeFormula.html">快捷重签</a></li>
							<li><a href="../page/user_delete.html">快捷销户</a></li>
							<li><a href="../page/user_reportShortcut.html">快捷操作记录</a></li>
							<li><a href="../page/user_docNum.html">档案号管理</a></li>
							<li><a href="../page/user_sendMsg.html">短信群发</a></li>
						</ul>
						
					</div>
				</li>

				<li class="nav_dropdown nav_icon">
					<a href="javascript:;"><span class="ui-icon ui-icon-pencil"></span>抄表管理</a>
					
					<div class="nav_menu">			
						<ul>
							<li><a href="../page/rd_volume.html">表册管理</a></li>	
							<li><a href="../page/rd_init.html">抄表初始化</a></li>	
							<li><a href="../page/rd_task.html">任务分配</a></li>	
							<li><a href="../page/rd_enter.html">抄表录入</a></li>	
							<li><a href="../page/rd_audit.html">抄表审核</a></li>
							<li><a href="../page/rd_reportReading.html">抄表情况查询</a></li>	
							<li><a href="../page/rd_reportVolumeReading.html">抄表统计报表</a></li>	
							<li><a href="../page/rd_reportZero.html">零吨位用户查询</a></li>	
							<li><a href="../page/rd_reportMaxValue.html">最大码值修正记录</a></li>
							<li><a href="../page/rd_reportCPreAmount.html">底码修正记录</a></li>	
							<li><a href="../page/rd_reportMeterCheck.html">水表周检报表</a></li>
						</ul>
						
					</div>
				</li>
				
				<li class="nav_dropdown nav_icon">
					<a href="javascript:;"><span class="ui-icon ui-icon-star"></span>收费管理</a>
					
					<div class="nav_menu">			
						<ul>
							<li><a href="../page/pay_window.html">窗口收费</a></li>	
							<li><a href="../page/pay_batch.html">批量收费</a></li>
							<li><a href="../page/pay_invoiceReprint.html">发票补开/作废</a></li>	
							<li><a href="../page/pay_reportDebts.html">欠费报表</a></li>	
							<li><a href="../page/pay_reportPay.html">收费情况报表</a></li>	
							<li><a href="../page/pay_reportMonthRecycle.html">月资金回收情况报表</a></li>	
							<li><a href="../page/pay_reportBalance.html">用户预收情况报表</a></li>	
							<li><a href="../page/pay_reportWaterType.html">各类用水统计总表</a></li>
						</ul>
						
					</div>
				</li>
				
				<li class="nav_dropdown nav_icon">
					<a href="javascript:;"><span class="ui-icon ui-icon-script"></span>发票管理</a>
					
					<div class="nav_menu">			
						<ul>
							<li><a href="../page/inv_invoiceManage.html">发票总表</a></li>
							<li><a href="../page/inv_invoiceIn.html">发票入库</a></li>	
							<li><a href="../page/inv_invoiceOut.html">发票出库</a></li>
							<li><a href="../page/inv_invoiceArchive.html">发票交票</a></li>
							<li><a href="../page/inv_invoiceReportOut.html">发票出库情况查询</a></li>	
							<li><a href="../page/inv_invoiceReportEmp.html">收费人员发票查询</a></li>	
							<li><a href="../page/inv_invoiceReportArchive.html">发票交票情况查询</a></li>	
							<li><a href="../page/inv_invoiceReportUse.html">发票使用情况查询</a></li>	
							<li><a href="../page/inv_invoiceReportMoneySum.html">销账汇总报表</a></li>	
							<li><a href="../page/inv_invoiceReportMoneyDetail.html">销账明细报表</a></li>	
						</ul>
					</div>
				</li>

				<li class="nav_dropdown nav_icon">
					<a href="javascript:;"><span class="ui-icon ui-icon-gear"></span>系统设置</a>
					
					<div class="nav_menu">			
						<ul>
							<li><a href="../page/sys_area.html">抄表辖区</a></li>	
							<li><a href="../page/sys_meterType.html">水表型号</a></li>	
							<li><a href="../page/sys_dept.html">部门管理</a></li>	
							<li><a href="../page/sys_emp.html">员工管理</a></li>	
							<li><a href="../page/sys_menupower.html">菜单权限设置</a></li>	
							<li><a href="../page/sys_areapower.html">辖区权限设置</a></li>	
							<li><a href="../page/sys_waterType.html">用水类型设定</a></li>	
							<li><a href="../page/sys_surcharge.html">附加费设定</a></li>	
							<li><a href="../page/sys_flow.html">流程配置</a></li>	
						</ul>
						
					</div>
				</li>
				
				<li class="nav_current nav_dropdown nav_icon_only">
					<a href="javascript:;">&nbsp;</a>
					
					<div class="nav_menu">
						<ul>
							<li><a href="../workspace.html">我的工作台</a></li>
							<li><a href="../page/sys_pwd.html">修改密码</a></li>
							<li><a href="../login.html">退出系统</a></li>
						</ul>
					</div> &lt;!&ndash; .menu &ndash;&gt;
				</li>
			</ul>
		</div> &lt;!&ndash; .content_pad &ndash;&gt;
		
	</div> &lt;!&ndash; #header &ndash;&gt;
	
	<div id="masthead">
		<div>
			<span id="pagetitle"><a href="javascript:;">快捷新户</a></span>
			<span id="welcome_span">欢迎回来，马云</span>
		</div>
	</div> &lt;!&ndash; #masthead &ndash;&gt;	-->
	
	<div id="content" class="xgrid" >

		<div class="x12">
			
			<h2>快捷新户</h2>

				<table width="100%">
				<thead>
					<tr>
						<th width="60"></th>
						<th width="220"></th>
						<th width="60"></th>
						<th width="220"></th>
						<th width="60"></th>
						<th></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>用户编码</td>
						<td><input readonly="readonly" v-model="user.userNo" disabled="disabled" /></td>
						<td>用户类型</td>
						<td><select v-model="user.userType" style="width:156px;">
                                <option>请选择--</option>
								<option value="私户">私户</option>
								<option value="公户">公户</option>
							</select></td>
						<td>所属辖区</td>
						<td><select style="width:156px;" v-model="user.areaId" @change="ssxq()" >
                                <option>请选择--</option>
								<option v-for="t in xq" v-bind:value="t.id">{{t.areaName}}</option>
							</select>

						</td>
					</tr>
					<tr>
						<td>用户名称</td>
						<td><input v-model="user.username" /></td>
						<td>开户时间</td>
						<td><input readonly="readonly" v-model="user.createDate" /></td>
						<td>收款方式</td>
						<td><select style="width:156px;" v-model="user.payType" >
                                <option>请选择--</option>
								<option value="坐收">坐收</option>
								<option value="走收">走收</option>
								<option value="银行代扣">银行代扣</option>
							</select></td>
					</tr>
					<tr>
						<td>联系电话</td>
						<td><input v-model="user.phone" /></td>
						<td>开户银行</td>
						<td><input v-model="user.bankName" /></td>
						<td>银行账号</td>
						<td><input v-model="user.bankNum" /></td>
					</tr>
					<tr>
						<td>短信电话</td>
						<td><input v-model="user.smsPhone" /></td>
						<td>用户地址</td>
						<td colspan="3"><input size="68"  v-model="user.address" /></td>
					</tr>
					<tr>
						<td>档案编号</td>
						<td><input v-model="user.docNum" /></td>
						<td>合同编号</td>
						<td><input v-model="user.contractNum" /></td>
						<td>签订日期</td>
						<td><input v-model="user.contractDate" /></td>
					</tr>
					<tr>
						<td style="vertical-align:middle;">提比提量</td>
						<td colspan="5">
							<span class="text_button">
							<input id="txtTibi" style="width:668px;" readonly="readonly" v-model="user.formula" />
							<button @click="tibi()">设定</button></span>
						</td>
					</tr>
					<tr>
						<td>水表编号</td>
						<td><input readonly="readonly" disabled="disabled" v-model="mater.meterNo" /></td>
						<td>表身码</td>
						<td><input v-model="mater.meterName" /></td>
						<td>起始底码</td>
						<td><input v-model="mater.startValue" /></td>
					</tr>
					<tr>
						<td>水表类型</td>
						<td><select style="width:158px;" v-model="mater.meterTypeID" >
                                <option>请选择--</option>
								<option v-for="l in lx" v-bind:value="l.id">{{l.meterTypeName}}</option>

							</select></td>
						<td>水表口径</td>
						<td><input  v-model="mater.aperture" /></td>
						<td>最大码值</td>
						<td><input v-model="mater.maxValue" /></td>
					</tr>
					<tr>
						<td>装表日期</td>
						<td><input v-model="mater.setupDate" /></td>
						<td>水表厂家</td>
						<td colspan="3"><input size="68" v-model="mater.factory" /></td>
					</tr>
				</tbody>
				</table>
				
				<div style=" margin:20px 0px 0px 66px;" >
					<button class="btn" @click="addUser()">创建新户</button>
				</div>

		</div> <!-- .x12 -->
		
	</div> <!-- #content -->
	
	<div id="footer">		
		<div class="content_pad">			
			<p>&copy; 2013-11 版权所有 <a href="#">湖南省自来水公司</a>.   技术支持 <a href="#">职业教育</a>.</p>
		</div> <!-- .content_pad -->
	</div> <!-- #footer -->
	
</div> <!-- #wrapper -->

<script>
    function callback2(tibi,t) {
        wrapper.user.formula=tibi;
    }

    function load(){

        $.getJSON("/user/addSC",{},function (json) {

            wrapper.xq=json.salist;
            wrapper.user.createDate=json.khTime;
            wrapper.user.contractDate=json.khTime;
            wrapper.mater.setupDate=json.khTime;
            wrapper.lx=json.materlist;
        });

    }
    var wrapper=new Vue({
        el:"#wrapper",
        data:{
            user:{
                userno:'',
                username:'',
                abc:'',
                createDate:'',
                address:'',
                phone:'',
                smsPhone:'',
                areaId:'请选择--',
                userType:'请选择--',
                payType:'请选择--',
                bankName:'',
                bankNum:'',
                formula:'',
                userMoney:'',
                meterId:'',
                docNum:'',
                pwd:'',
                contractNum:'',
                contractDate:'',
                volumeId:'',
                volumeOrderIndex:'',
                disabled:''
            },
            xq:'',
            mater:{
                meterNo:'',
                userNo:'',
                meterName:'',
                meterTypeID:'请选择--',
                maxValue:'',
                startValue:'',
                setupDate:'',
                factory:'',
                disabled:'',
                aperture:''
            },
            lx:''
        },
        methods:{
            ssxq(){
                var t;
                if(this.user.areaId<=9){
                    t='0'+this.user.areaId;
                }
                $.get("/user/userID",{"xq":t},function (json) {
                    wrapper.user.userNo=json.userId;
                    wrapper.mater.meterNo=json.materId;
                });

            },
            tibi(){
                var $ = layui.jquery,
                    layer = layui.layer,
                    form = layui.form;

                //延迟加载样式
                layer.load(1);
                //宽
                var w = ($(window).width() * 0.7);
                //高
                var h = ($(window).height() - 50);

                //延迟加载0.5秒
                setTimeout(function(){
                    layer.closeAll('loading');
                    var index=layer.open({
                        resize: false,
                        shadeClose: true,
                        area: [w + 'px', h + 'px'],
                        type: 2,
                        btn:["关闭"],
                        scrollbar: false,
                        content: '/page/sys_setTibi.html',
                        maxmin: true,
                        success: function (layero, index) {
                    //        var body = layer.getChildFrame('body', index);
                    //        body.find('#content').append(editor.txt.html());
                        }
                    });
                    layer.full(index);
                }, 500);
            },
            addUser(){

                $.post("/user/addUser",{"user":wrapper.user,"mater":wrapper.mater},function () {
                    sweetAlert(
                        '添加成功！',
                        '',
                        'success'
                    )
                    location.reload();
                });

            }
        },
        created(){
            load();
        }
    });

</script>

<script type="text/javascript">
	
$(document).ready ( function () 
{
	Dashboard.init ();
	
});


</script>

</body> 
 
</html>